package mips.instruction;

import mips.Reg;
import mips.element.Instruction;

public class BGT extends Instruction {
    private Reg rs;
    private Reg rt;
    private int imm;
    private String offset;

    public BGT(Reg rs, Reg rt, String offset) {
        this.rs = rs;
        this.rt = rt;
        this.offset = offset;
    }

    public BGT(Reg rs, int imm, String offset) {
        this.rs = rs;
        this.imm = imm;
        this.offset = offset;
    }

    public Reg getRs() {
        return rs;
    }

    public Reg getRt() {
        return rt;
    }

    public int getImm() {
        return imm;
    }

    public String getOffset() {
        return offset;
    }

    public String toString() {
        if (rt != null) {
            return "bgt\t" + rs + " " + rt + " " + offset;
        } else {
            return "bgt\t" + rs + " " + imm + " " + offset;
        }
    }
}
